<template>
	<view class="page">
		<view class="cu-bar bg-white padding" >
			<!-- <view class="solid-bottom text-df text-left" v-for="(item,index) in resultData" :key="index">{{item.words}}</view> -->
			<textarea class="text" :style="{
				height:scrollHeight
			}"
			 maxlength="-1" v-model="resultData" placeholder="多行文本输入框">
				
			</textarea>
		</view>
	</view>
</template>

<script>
	
	export default {
		
		data() {
			return {
				resultData:'',
				scrollHeight:'',
			};
		},
		onLoad() {
			
			let obj = uni.getSystemInfoSync();
			let clientHeight = obj.screenHeight;
			this.scrollHeight = clientHeight-100+'px';
			this.getResult();
		},
		methods: {
			
			async getResult(){
				let param = uni.getStorageSync('scanParam') ;
				// let param = {image_path:path};
				// let data = await this.$http.post('fiveRisks',{city:'重庆市',wages_before:'10000',wages_real:'6000'});
				let data = await this.$http.post(
					'fontScan', //可以直接放链接(将不启用全局定义域名)
					param, 
				);
				// this.resultData = data;
				for(var i in data){
					this.resultData += (data[i].words);
				}
			},
		}
	}
</script>

<style>
	.page {
		height: 100%;
		width: 100%;
		background: #FFF;
		position: absolute;
		
	}
	.cu-bar{
		text-align: center;
		display: block;
		margin-top: 10px;
	}
	.img{
		width: 100%;
	}
	.text{
		width: 100%;
		text-align: left;
	}
	.card{
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
	}
	.sure{
		width: 150px;
		height: 40px;
	}
	.bottom{
		position: fixed !important;
		width: 100%;
		bottom: 20px;
	}
	.page.show {
		overflow: hidden;
	}
	.input{
		text-align: right;
		font-size: 12px;
	}
	
</style>
